/*    */ package com.wgcloud.common;
/*    */ 
/*    */ import com.wgcloud.common.NettytHandler;
/*    */ import io.netty.channel.Channel;
/*    */ import io.netty.channel.ChannelHandler;
/*    */ import io.netty.channel.ChannelInitializer;
/*    */ import io.netty.channel.ChannelPipeline;
/*    */ import io.netty.channel.socket.SocketChannel;
/*    */ import io.netty.handler.codec.http.HttpObjectAggregator;
/*    */ import io.netty.handler.codec.http.HttpServerCodec;
/*    */ import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
/*    */ import io.netty.handler.stream.ChunkedWriteHandler;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class NettyServerInitializer
/*    */   extends ChannelInitializer<SocketChannel>
/*    */ {
/*    */   protected void initChannel(SocketChannel socketChannel) throws Exception {
/* 22 */     ChannelPipeline pipeline = socketChannel.pipeline();
/*    */ 
/*    */     
/* 25 */     pipeline.addLast(new ChannelHandler[] { (ChannelHandler)new HttpServerCodec() });
/*    */     
/* 27 */     pipeline.addLast(new ChannelHandler[] { (ChannelHandler)new ChunkedWriteHandler() });
/*    */     
/* 29 */     pipeline.addLast(new ChannelHandler[] { (ChannelHandler)new HttpObjectAggregator(63488) });
/*    */     
/* 31 */     pipeline.addLast(new ChannelHandler[] { (ChannelHandler)new WebSocketServerProtocolHandler("/ws") });
/*    */     
/* 33 */     pipeline.addLast(new ChannelHandler[] { (ChannelHandler)new NettytHandler() });
/*    */   }
/*    */ }


/* Location:              /Users/zhangyongxin/soft-install/wgcloud/wgcloud-v3.3.5/server/bank/wgcloud-server-release.jar!/BOOT-INF/classes/com/wgcloud/common/NettyServerInitializer.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */